package com.hontech.pastacooking.net


class HandlerTask (val client: NetClient, val frame: ReadFrame): Runnable {

    override fun run() {

        try {
            exec()
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    private fun exec() {
        val req = frame.request()
        when (req) {
            REQ_GET_STATUS -> onGetStatus()
        }
    }

    private fun onGetStatus() {
/*        NetClient.notify(REQ_MAIN_STATUS, MainProto.status)
        NetClient.notify(REQ_HEAT_STATUS )*/
    }
}
